// 对外暴露一个单例实例化的方法
import Notification from './notification'

let messageInstance

function getMessageInstance() {
  messageInstance = messageInstance || Notification.newInstance()
  return messageInstance
}

function notice(not) {
  let instance = getMessageInstance()
  instance.add(not)
}

export default {
  info(options) {
    return notice(options)
  }
}
